Fonts used in computers may be represented using a vector description describing the outline of a character shape. Fonts are generally grouped together into a collection of fonts known as a font family. The fonts within the font family are related in their designs but with some variation applied. Example variations that are common include bold, italic and bold italic variations. Typically, each font variation is created by a human font designer and separate font files for each variation are produced. Often, the master font without any variations is the regular font.
Typically when displayed text requires emphasis, a bold font variation is used. A bold font variation often has strokes that are darker when compared to the regular font, often produced by thickening of the strokes. An example of a bold variation is shown in FIGS. 2A and 2B. In FIG. 2A, an uppercase character ‘A’ is shown for the regular font. FIG. 2B shows the corresponding bold variation, which was created by a human font designer. The right stroke 202 for the bold variant in FIG. 2B is darker than the right stroke 201 for the regular variant in FIG. 2A. The darkening of stroke 202 compared to stroke 201 is produced by thickening of the stroke while the other strokes in the character do not feature significant differences in thickness.
In the absence of a human to create bold variation, automated means of creating bold variations may sometimes be employed. The absence of variations may occur due to various reasons including high cost of human labour to produce, and/or font storage space may be limited. One common method of automated bold variation generation involves thickening of the strokes. One method that provides this effect is the “polygon offset” algorithm. While various implementations of the “polygon offset” algorithm exist, most implementations produce an outline at a specified distance away from the original outline. Shown in FIG. 3 is an example upper-case character ‘A’, from FIG. 2A, whereby the “polygon offset” has been applied. The character which defines the original outline 301 is filled on the inside 302. To produce the polygon offset path 303, an outline is produced such that each edge is at a fixed distance away from the original path in the outwards direction. When measurements are performed between the original outline and the emboldened outline, such as distances 304, 305 and 306, are of a pre-set distance, and the polygon offset path 303 is oriented a fixed distance away from the original outline 301 on all sides of the character.
The polygon offset method is an efficient algorithm for automated emboldenment but lacks the quality as compared to human generated bold variations. FIGS. 4A and 4B show a comparison of the polygon offset relative to the human designed bold variation. In FIG. 4A a polygon offset path variation is shown, and in FIG. 4B the human font designer generated bold variation is shown. While the thickest stem in the polygon offset method 401 matches the thickness of the human designed bold variation 403, the other strokes have different thicknesses. The thinnest stroke in the polygon offset path 402 has a thickness that is difficult to discern from the boldest 401, and the difference in thickness of the thinnest stroke in the human designed bold variation 404 has a thickness that is distinctly different to that of the thickest 403. The variation of thickness of strokes within a character is often called contrast.
From the comparison illustrated in FIG. 4, it can be seen that the typical automated bold variation generation based on polygon offset does not produce results that mimic that of what a designer intends and makes the font lacking contrast.